home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Disc to the Future 2
/
Disc to the Future Part II Programmer's Reference (Wayzata Technology)(6013)(1992).bin
/
MAC
/
THINKC
/
5
/
DINKDEMO
/
DINKCLAS
/
DDOCUMEN.H
< prev
next >
Wrap
Text File
|
1992-07-08
|
2KB
|
103 lines
/*
File: DDocument.h
Written by: Mark Gross
Copyright: ⌐ 1992 by Applied Technical Software, all rights reserved.
Use at your own risk.
*/
// This is the Class declatation for the DDocument class
#ifndef __DDOCUMENT__
#define __DDOCUMENT__
#include "DListStuff.h"
#include "DWindow.h"
class DEventHandler;
class DDocument : public DEventHandler
{
protected:
Handle fDataHandle;
OSType fCreator;
OSType fFileType;
public:
StandardFileReply *fFileReply;
short fFileRef;
DWindow *fDWindow;
Boolean fNeedToSave;
DDocument(void);
~DDocument(void);
virtual DDocument* Init( Boolean OpenFromFile);
virtual void AEInitDoc(FSSpec *theFSS);
virtual Boolean DoSaveAs(void);
virtual DWindow* MakeWindow(Boolean hasColorWindows);
virtual void WindowClosed(DWindow *deadWindow);
protected:
virtual void KillMeNext(void);
virtual void Close(void);
short WantToSave(WindowPtr theWindow);
public:
virtual void HandleMenuChoice(short menuID, short menuItem);
virtual void SetUpMenues(void);
protected:
virtual void DoUndo(void);
virtual void DoPaste(void);
virtual void DoCopy(void);
virtual void DoClear(void);
virtual void DoCut(void);
virtual void DoSellectAll(void);
void SellectFile(StandardFileReply* reply);
Boolean OpenFile(FSSpec *fileSpec);
virtual OSErr ReadData(short refNum, long *size);
Boolean SaveFile(void);
virtual OSErr WriteData(short refNum);
};// end of class declaration for DDocument
#define rWantToSave 500
#define iYes 1
#define iNo 3
#define iCancel 2
#endif __DDOCUMENT__